package com.jt.www.enums.issue;

/**
 * 财务状态
 */
public enum FinanceStatusEnum {
    FS_00("00", "未到账"),
    FS_01("01", "已到账"),
    FS_02("02", "部分到账"),
    FS_03("03", "已退款"),
    FS_99("99", "其他");

    private String code;
    private String desc;

    FinanceStatusEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static FinanceStatusEnum getEnumByCode(String code) {
        for (FinanceStatusEnum statusEnum : FinanceStatusEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum;
            }
        }
        return FS_99;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
